/**
 * 通用
 */

import http from '../utils/http.js'

// 获取配置信息
export function getConfig(params) {
	return http.get('/jeecg-boot/app/config/queryByKeywords', {params})
}

/**
 * 获取分类
 * @param {Object} params （pid,pcode,condition）
 */
export function getCategory(params) {
	return http.get('/jeecg-boot/sys/category/loadTreeData', { params })
}

export function loadOne(params) {
	return http.get('/jeecg-boot/sys/category/loadOne', { params })
}

export function login(data) {
	return http.post('/jeecg-boot/app/zbAppuser/wxlogin', data)
}
export function getOpenid(params) {
	return http.get('/jeecg-boot/app/zbAppuser/getOpenid', {
		params
	})
}

export function uploadImg(data) {
	return http.post('/jeecg-boot/sys/common/upload', data)
}

export function addLeaveword(data) {
	return http.post('/jeecg-boot/app/zbLeaveword/add', data)
}